import java.util.Scanner;

public class Exer3_7_3 {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        System.out.println("请输入您的购物金额");
        double money = input.nextDouble();
        if (money >= 200) {
            System.out.println(" 1:购物超过50元，加1元换购500毫升可乐；\n" +
                    "  2:购物超过100元，加2元换购1000毫升果汁；\n" +
                    "  3:购物超过100元，加4元换购炫迈口香糖一瓶；\n" +
                    "  4:购物超过200元，加38元换购一瓶进口红酒；\n" +
                    "  5:购物超过200元，加15元换购1袋面粉；\n" +
                    "  0:不换购");
            System.out.println("请输入选择的换购物品");
            int chose = input.nextInt();
            switch (chose) {
                case 1: {
                    money = money + 1;
                    System.out.println("换购的物品为：500毫升可乐");
                }
                break;
                case 2: {
                    money = money + 2;
                    System.out.println("换购的物品为：1000毫升果汁");
                }
                break;
                case 3: {
                    money = money + 4;
                    System.out.println("换购的物品为：炫迈口香糖一瓶");
                    System.out.println("实际支付金额为：" + money + "元");
                }
                break;
                case 4: {
                    money = money + 38;
                    System.out.println("换购的物品为：进口红酒一瓶");
                }
                break;
                case 5: {
                    money = money + 15;
                    System.out.println("换购的物品为：面粉一袋");
                }
                break;
                default: {
                    System.out.println("未换购任何商品");
                }break;
            }
        } else if (money >= 100 ) {
            System.out.println("  1:购物超过50元，加1元换购500毫升可乐；\n" +
                    "  2:购物超过100元，加2元换购1000毫升果汁；\n" +
                    "  3:购物超过100元，加4元换购炫迈口香糖一瓶；\n"+"0:不换购");
            System.out.println("请输入选择的换购物品");
            int chose = input.nextInt();
            switch (chose) {
                case 1: {
                    money = money + 1;
                    System.out.println("换购的物品为：500毫升可乐");
                }
                break;
                case 2: {
                    money = money + 2;
                    System.out.println("换购的物品为：1000毫升果汁");
                }
                break;
                case 3: {
                    money = money + 4;
                    System.out.println("换购的物品为：炫迈口香糖一瓶");
                }
                break;
                default: {
                    System.out.println("未换购任何商品");
                }break;

            }
        }else if(money>=50){
            System.out.println("  1:购物超过50元，加1元换购500毫升可乐；\n" +"0:不换购");
            System.out.println("请输入选择的换购物品");
            int chose = input.nextInt();
            switch(chose){
                case 1: {
                    money = money + 1;
                    System.out.println("换购的物品为：500毫升可乐");
                }break;
                default: {
                    System.out.println("未换购任何商品");
                }break;
            }
        }else{
            System.out.println("不参与换购");
        }
        System.out.println("实际支付金额为：" + money + "元");
    }
}